package com.edu.study.base.StuAnswerResultErrorDetail.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.edu.study.base.StuAnswerResultErrorDetail.mapper.StuAnswerResultErrorDetailMapper;
import com.edu.study.base.StuAnswerResultErrorDetail.domain.StuAnswerResultErrorDetail;
import com.edu.study.base.StuAnswerResultErrorDetail.service.IStuAnswerResultErrorDetailService;

/**
 * 学生答题结果错题明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-06-20
 */
@Service
//@DataSource(value = DataSourceType.SLAVE)
public class StuAnswerResultErrorDetailServiceImpl implements IStuAnswerResultErrorDetailService 
{
    @Autowired
    private StuAnswerResultErrorDetailMapper stuAnswerResultErrorDetailMapper;

    /**
     * 查询学生答题结果错题明细
     * 
     * @param id 学生答题结果错题明细ID
     * @return 学生答题结果错题明细
     */
    @Override
    public StuAnswerResultErrorDetail selectStuAnswerResultErrorDetailById(Long id)
    {
        return stuAnswerResultErrorDetailMapper.selectStuAnswerResultErrorDetailById(id);
    }

    /**
     * 查询学生答题结果错题明细列表
     * 
     * @param stuAnswerResultErrorDetail 学生答题结果错题明细
     * @return 学生答题结果错题明细
     */
    @Override
    public List<StuAnswerResultErrorDetail> selectStuAnswerResultErrorDetailList(StuAnswerResultErrorDetail stuAnswerResultErrorDetail)
    {
        return stuAnswerResultErrorDetailMapper.selectStuAnswerResultErrorDetailList(stuAnswerResultErrorDetail);
    }

    /**
     * 新增学生答题结果错题明细
     * 
     * @param stuAnswerResultErrorDetail 学生答题结果错题明细
     * @return 结果
     */
    @Override
    public int insertStuAnswerResultErrorDetail(StuAnswerResultErrorDetail stuAnswerResultErrorDetail)
    {
        return stuAnswerResultErrorDetailMapper.insertStuAnswerResultErrorDetail(stuAnswerResultErrorDetail);
    }

    /**
     * 修改学生答题结果错题明细
     * 
     * @param stuAnswerResultErrorDetail 学生答题结果错题明细
     * @return 结果
     */
    @Override
    public int updateStuAnswerResultErrorDetail(StuAnswerResultErrorDetail stuAnswerResultErrorDetail)
    {
        return stuAnswerResultErrorDetailMapper.updateStuAnswerResultErrorDetail(stuAnswerResultErrorDetail);
    }

    /**
     * 批量删除学生答题结果错题明细
     * 
     * @param ids 需要删除的学生答题结果错题明细ID
     * @return 结果
     */
    @Override
    public int deleteStuAnswerResultErrorDetailByIds(Long[] ids)
    {
        return stuAnswerResultErrorDetailMapper.deleteStuAnswerResultErrorDetailByIds(ids);
    }

    /**
     * 删除学生答题结果错题明细信息
     * 
     * @param id 学生答题结果错题明细ID
     * @return 结果
     */
    @Override
    public int deleteStuAnswerResultErrorDetailById(Long id)
    {
        return stuAnswerResultErrorDetailMapper.deleteStuAnswerResultErrorDetailById(id);
    }
}
